package cn.edu.sptc.LiXin.hellosprring.bean;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@ToString
@Slf4j
public class AutowiredBean {
    @Getter
    @Setter
    private int id;
    @Getter @Setter private String name;

    public AutowiredBean() {
        this.id = 1001;
        this.name = "张三";
        log.info("无参构造函数");
    }

    public AutowiredBean(int id, String name) {
        this.id = id;
        this.name = name;
        log.info("全参构造函数");
    }
}
